package day16_Runnable.demo09例子;

import java.io.BufferedReader;
import java.io.FileReader;
import java.util.HashMap;

public class demoClazzSumCopy {
    public static void main(String[] args) throws Exception{
        HashMap<String, Integer> map = new HashMap<>();
        BufferedReader br = new BufferedReader(new FileReader("E:\\csw\\Demo\\a\\bigdata.txt"));
        String line;
        while ((line=br.readLine())!=null){
            String s = line.split(",")[4];
            if (map.containsKey(s)){
                map.put(s,map.get(s)+1);
            }else{
                map.put(s,1);
            }
        }
        br.close();
        System.out.println(map);
    }
}
